package com.pay.ioopos.support.keyboard;

import com.pay.ioopos.MainProvider;
import com.pay.ioopos.support.keyboard.geekmaker.GmKeyboard;

/**
 * 键盘工厂类
 * @author    Moyq5
 * @since  2020/7/22 15:05
 */
public abstract class KeyboardFactory {

    private static MainProvider provider;

    private KeyboardFactory() {

    }

    public static MainProvider getProvider() {
        return provider;
    }

    public static void setProvider(MainProvider provider) {
        KeyboardFactory.provider = provider;
    }

    public static UsbKeyboard getKeyboard() {
        return GmKeyboard.getInstance();
    }

    public static void setOnKeyboardListener(OnKeyboardListener listener) {
        GmKeyboard.getInstance().setListener(listener);
    }
}
